<template>
  <div>
    <el-form :model="form" label-width="auto">
      <el-row>
        <el-col :span="4">
          <el-form-item label="ip">
            <el-input v-model="form.ip" placeholder="ip地址"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="电话">
            <el-input v-model="form.phone" placeholder="电话号码"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="地址路径">
            <el-input v-model="form.url" placeholder="url路径"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="用户名">
            <el-input v-model="form.username" placeholder="用户名"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item>
            <el-button type="primary" @click="onSubmit">查询</el-button>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>

  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {},
    };
  },
  methods: {
    onSubmit() {
      let params = {};
      if (this.form) {
        Object.assign(params, this.form);
      }
      console.log(params);
      this.$emit("search", params);
    },
  },
};
</script>

<style>
</style>
